 (function(__global) {
	'use strict';
	if (typeof __global.jl !== 'undefined') {
		return;
	}
	var emptyFn = function() {
	};
	if (!__global.console) {
		__global.console = {
			log : emptyFn,
			error : emptyFn,
			info : emptyFn,
			warn : emptyFn
		};
	}
	function jlClass() {
	}
	;
	var _jl = new jlClass();
	function setProperty(object, proerptyName, value, writable, enumerable, configurable) {
		Object.defineProperty(object, proerptyName, {
			value : value,
			writable : writable,
			enumerable : enumerable,
			configurable : configurable
		});
	}
	setProperty(jlClass.prototype, 'contextPath', '', false, true, false);
	
	var forward = function(url, noParent) {
		window.location.href = jl.contextPath + (_.startsWith(url, '/') ? url : '/' + url);
	};
	var open = function(url){
		var $a = $('<a></a>');
		$a.attr('target', '_blank');
		$a.attr('href', jl.contextPath + _.startsWith(url, '/') ? url : '/' + url);
		$('body').append($a);
		$a[0].click();
		$a.remove();
	};
	var uuid = function(prefix){
		return (prefix ? prefix + '_' : '') + 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
			var r = Math.random() * 16|0;
			var v = c == 'x' ? r : (r&0x3|0x8);
			return v.toString(16);
		});
	};
	var getParam = function(name) {  
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");  
        var r = window.location.search.substr(1).match(reg);  
        if (r != null) return unescape(r[2]);  
        return null;  
    };
	jlClass.prototype.open = open;
	jlClass.prototype.uuid = uuid;
	jlClass.prototype.getParam = getParam;
	__global.jl = _jl;
})(this);
